API

Collaboration APIs

POST collaboration/file-versions

Creates a new file entity for file metadata.

HTTP method POST
URI https://api.rambase.net/collaboration/file-versions
Supported formats Xml, Html, Json (ex. $format=json)
Successful HTTP status code 201
API resource identifier 4611, version 13

The following body must be added to the request. Mouse over fieldnames for description and other useful information about the fields. Note that fields in bold are required/mandatory.

Format:
1
<FileVersion>
2
     <Filename
Filename

Required/mandatory field

Filename to display for the file version. Will be used when downloading the file.

>
{String}</Filename>
3
     <IsInternal
IsInternal

Flag to indicate that a file is for inhouse use only. Not to be sent to customers or suppliers.

Default value: False

This field is optional.

>
{Boolean}</IsInternal>
4
     <HashCode
HashCode

Unique hash to identify and verify a file

This field is optional.

>
{String}</HashCode>
5
     <DocumentReference
DocumentReference

This field is a freetext field that is maintained by user input and is intended to reflect the file contents identification reference for better document recognition purposes.

This field is optional.

>
{String}</DocumentReference>
6
     <FileSize
FileSize

The size of the file in bytes

This field is optional.

>
{Integer}</FileSize>
7
     <Assignee
Assignee

User id of assignee. Indicates the next action user id.

This field is optional.

>
8
          <UserId
UserId

User identifier

Minimum value: 100

This field is optional.

>
{Integer}</UserId>
9
     </Assignee>
10
     <Approval
Approval

This field is optional.

>
11
          <Deadline
Deadline

Deadline date for a file to be approved

This field is optional.

>
{Date}</Deadline>
12
          <DocumentController
DocumentController

User id of document controller

This field is optional.

>
13
               <UserId
UserId

User identifier

Minimum value: 100

This field is optional.

>
{Integer}</UserId>
14
          </DocumentController>
15
     </Approval>
16
     <ExternalOwner
ExternalOwner

This field is optional.

>
17
          <ObjectId
ObjectId

Identifier of the object

Minimum value: 100000

This field is optional.

>
{Integer}</ObjectId>
18
          <ObjectType
ObjectType

Type of object

This field is optional.

>
{String}</ObjectType>
19
     </ExternalOwner>
20
     <Certification
Certification

Reference to the certificate of the uploader

This field is optional.

>
21
          <IssuedCertificateId
IssuedCertificateId

Issued certificate item identifier

Minimum value: 1

This field is optional.

>
{Integer}</IssuedCertificateId>
22
          <Certificate
Certificate

This field is optional.

>
23
               <CertificateId
CertificateId

Certificate identifier

Minimum value: 100000

This field is optional.

>
{Integer}</CertificateId>
24
          </Certificate>
25
     </Certification>
26
     <File>
27
          <Description
Description

Description of file

This field is optional.

>
{String}</Description>
28
          <SearchTag
SearchTag

Search words that can be used to find and recognize files in search

This field is optional.

>
{String}</SearchTag>
29
          <Revision
Revision

The file revision is a freetext field and can be used in production for drawings and procedures etc. The revision field can only be set when creating a file, and never changed. If a file gets a new revision, a new file should be uploaded.

This field is optional.

>
{String}</Revision>
30
          <FileType
FileType

Required/mandatory field

Type of file

>
31
               <FileTypeId
FileTypeId

Required/mandatory field

Unique identifier for a file type

Minimum value: 100000

>
{Integer}</FileTypeId>
32
          </FileType>
33
     </File>
34
     <ObjectReferences>
35
          <Object>
36
               <Database
Database

Company code/database the object belongs to

This field is optional.

>
{String}</Database>
37
               <ObjectId
ObjectId

Required/mandatory field

Identifier of the object

>
{Integer}</ObjectId>
38
               <ObjectType
ObjectType

Required/mandatory field

Type of object

>
{String}</ObjectType>
39
               <ItemId
ItemId

Item-number of the object

This field is optional.

>
{Integer}</ItemId>
40
               <ItemType
ItemType

Type of item

This field is optional.

>
{String}</ItemType>
41
          </Object>
42
     </ObjectReferences>
43
</FileVersion>
1
{
2
     "fileVersion": {
3
          "filename
Filename

Required/mandatory field

Filename to display for the file version. Will be used when downloading the file.

":
"{String}",
4
          "isInternal
IsInternal

Flag to indicate that a file is for inhouse use only. Not to be sent to customers or suppliers.

Default value: False

This field is optional.

":
"{Boolean}",
5
          "hashCode
HashCode

Unique hash to identify and verify a file

This field is optional.

":
"{String}",
6
          "documentReference
DocumentReference

This field is a freetext field that is maintained by user input and is intended to reflect the file contents identification reference for better document recognition purposes.

This field is optional.

":
"{String}",
7
          "fileSize
FileSize

The size of the file in bytes

This field is optional.

":
"{Integer}",
8
          "assignee
Assignee

User id of assignee. Indicates the next action user id.

This field is optional.

":
{
9
               "userId
UserId

User identifier

Minimum value: 100

This field is optional.

":
"{Integer}"
10
          },
11
          "approval
Approval

This field is optional.

":
{
12
               "deadline
Deadline

Deadline date for a file to be approved

This field is optional.

":
"{Date}",
13
               "documentController
DocumentController

User id of document controller

This field is optional.

":
{
14
                    "userId
UserId

User identifier

Minimum value: 100

This field is optional.

":
"{Integer}"
15
               }
16
          },
17
          "externalOwner
ExternalOwner

This field is optional.

":
{
18
               "objectId
ObjectId

Identifier of the object

Minimum value: 100000

This field is optional.

":
"{Integer}",
19
               "objectType
ObjectType

Type of object

This field is optional.

":
"{String}"
20
          },
21
          "certification
Certification

Reference to the certificate of the uploader

This field is optional.

":
{
22
               "issuedCertificateId
IssuedCertificateId

Issued certificate item identifier

Minimum value: 1

This field is optional.

":
"{Integer}",
23
               "certificate
Certificate

This field is optional.

":
{
24
                    "certificateId
CertificateId

Certificate identifier

Minimum value: 100000

This field is optional.

":
"{Integer}"
25
               }
26
          },
27
          "file": {
28
               "description
Description

Description of file

This field is optional.

":
"{String}",
29
               "searchTag
SearchTag

Search words that can be used to find and recognize files in search

This field is optional.

":
"{String}",
30
               "revision
Revision

The file revision is a freetext field and can be used in production for drawings and procedures etc. The revision field can only be set when creating a file, and never changed. If a file gets a new revision, a new file should be uploaded.

This field is optional.

":
"{String}",
31
               "fileType
FileType

Required/mandatory field

Type of file

":
{
32
                    "fileTypeId
FileTypeId

Required/mandatory field

Unique identifier for a file type

Minimum value: 100000

":
"{Integer}"
33
               }
34
          },
35
          "objectReferences": [
36
               {
37
                    "database
Database

Company code/database the object belongs to

This field is optional.

":
"{String}",
38
                    "objectId
ObjectId

Required/mandatory field

Identifier of the object

":
"{Integer}",
39
                    "objectType
ObjectType

Required/mandatory field

Type of object

":
"{String}",
40
                    "itemId
ItemId

Item-number of the object

This field is optional.

":
"{Integer}",
41
                    "itemType
ItemType

Type of item

This field is optional.

":
"{String}"
42
               }
43
          ]
44
     }
45
}

The query string is placed after the resource URL, seperated with a questionmark (?). The query string is composed of a series of query parameters with values. See the page about query parameters on how to use these parameters.

$access_token String, optional After successful login you get an access token which needs to be provided in all API requests. Even though it is possible to pass this token as query parameter, we recommended passing it using the HTTP request header as described in Authorization. Note that all access tokens have an expiration time.
$db String, optional Set the database/company for the request
$useMinimumVersion Integer, optional Used to run a new version of an API resource when your API client is running a deprecated API resource. See the Breaking changes page for more information.
$lang String, optional Specifies the language used in the response, following the 3-letter ISO-639-1 [lll]

Read more about filters and sorting on how to use filter parameters and named filters.

Read more about filters and sorting on how to use sortable parameters

Requesting this resource will yield the following response. Mouse over fieldnames (or fieldgroups) for descriptions and other useful information about the fields.

Please note that some fields may be removed from the response, based on user roles/duties/permissions.

Format:
1
1

List of available operations/actions for this resource.
See the operations documentation for more information about API operations.

Possible error codes the response might return:

Error 102667 HTTP 404 Customer group not found
Error 101069 HTTP 404 Stock assignment link - document not found
Error 101420 HTTP 404 Setting definition not found
Error 100199 HTTP 404 Location not found
Error 107763 HTTP 400 Only product structures can be set up for line production
Error 107764 HTTP 400 Only product structures can be externally manufactured
Error 103018 HTTP 400 Name of product is required
Error 105833 HTTP 400 CompanySetting require product name to be unique
Error 102975 HTTP 400 Unit can only be changed on product structures ( Type = K ) for batch productions
Error 103548 HTTP 400 DaysToExpediteScheduledStartDate can only be changed on product structures
Error 103550 HTTP 400 IsManufacturedExternally can only be changed on product structures
Error 103551 HTTP 400 IsManufacturedInBatches can only be changed on product structures
Error 103554 HTTP 400 AutomaticallyCreateWorkOrdersForSubstructures can only be changed on product structures
Error 104253 HTTP 400 ProduceInMultipleOf can only be changed on product structures.
Error 107694 HTTP 400 Use line production can only be changed on product structeres
Error 106999 HTTP 400 Sub module 'Projectorder' is not activated in this company
Error 106436 HTTP 400 Unit can only be changed when status is equal to draft (status 1)
Error 100167 HTTP 404 Measurement unit not found
Error 104486 HTTP 400 Unit production is only allowed for measurment units (UNI) of type QTY
Error 100200 HTTP 404 Special handling code not found
Error 100092 HTTP 404 Service template not found
Error 103020 HTTP 404 Qcdoc not found
Error 101091 HTTP 404 Contry of origin is not valid: {0}
Error 101124 HTTP 400 Hardware code already exists
Error 106437 HTTP 400 Type can not be changed when status is not equal to draft (status 1)
Error 101009 HTTP 400 The product has a structure. You can only change the product type to a type that can contain a structure.
Error 101010 HTTP 400 The product structure contains operations and can not be changed to become a phantom structure
Error 101008 HTTP 400 Cannot change product type from a physical type to a virtual type
Error 101007 HTTP 400 Cannot change product type from a virtual type to a physical type
Error 103021 HTTP 400 Linkid must be a rental product
Error 104760 HTTP 400 Costing method can't be changed after product has been received
Error 104652 HTTP 400 Both minimum sales price and minimum sales price currency must be given
Error 100563 HTTP 400 Currency {0} is not supported by the system
Error 104653 HTTP 400 Minimum sales price can not be negative
Error 106506 HTTP 404 Image not found